
/*
        The directives starting with # below ensures that this file is read by the compiler only once
        even if it is #included several times. It is call an "include guard"
*/
#ifndef CART_H_
#define CART_H_

//other types
#include "Chrono.h"                             //uncomment once you have added the type definition
#include <string>
#include <sstream>                              //KLB A2

using namespace Chrono;

struct Cart {
public:
        //data

        // constructors
        //Cart() {}
        Cart(int cartId, int custId, Date cartBuyDate) : cart_purchase_date(cartBuyDate.year(), cartBuyDate.month(), cartBuyDate.day())         //KLB A2
        {
                cart_id = cartId;                       //KLB A2
                cust_id = custId;                       //KLB A2
        }
        
        //Getters
        int cart_get()  const {return cart_id;}
        int cust_get()  const {return cust_id;}
        Date Date_get() const {return cart_purchase_date;}

        // utility functions
        string display() const                  //used to verify whether it has stored the information
        {
                stringstream ss;
                ss << "Cart(" << cart_id << ", " << cust_id << ")";
                return ss.str();
        }
private:
   //constants

   // private data
        int cart_id;
        int cust_id;
        Date cart_purchase_date;        //uncomment once you have added the type definition
};

#endif //CART_H_